<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>支付完成</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <style>
        .content {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }
        .icon {
            width: 80px;
            height: 80px;
            background: url("https://ionepin.oss-accelerate.aliyuncs.com/firstgrade/icon_success.png") no-repeat;
            background-size: 100% 100%;
            margin: 0 auto;
        }
        .title {
            font-size: 24px;
            text-align: center;
            color: #303133;
            margin-top: 10px;
        }
        .go-index {
            display: block;
            width: 200px;
            height: 40px;
            border-radius: 5px;
            border: 1px solid #685FC0;
            font-size: 15px;
            font-weight: 400;
            color: #685FC0;
            text-align: center;
            line-height: 40px;
            margin-top: 60px;
            text-decoration: none;
        }
    </style>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="./uni-web-view.js"></script>
</head>
<body>
    <div class="content">
        <div class="icon"></div>
        <div class="title">支付成功</div>
        <div id="go" class="go-index">返回首页</div>
    </div>
</body>
<script>
    var isHref = true
    document.addEventListener('UniAppJSBridgeReady', function() {
        uni.postMessage({
            data: {
                action: 'message'
            }
        });
        var env = null
        uni.getEnv(function(res) {
            env = JSON.stringify(res)
            console.log('当前环境：' + JSON.stringify(res));
        })
        $("#go").click(function() {
            if (env != '{"h5":true}') {
                uni.switchTab({
                    url: '/pages/user/index'
                })
            } else {
                window.location.href = "/"
            }
        })
    })
</script>
</html>
